package com.xuzz.study.springbootdemo.controller;

import com.xuzz.study.springbootdemo.entity.Response;
import com.xuzz.study.springbootdemo.exception.BaseException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class ExceptionController {

    @RequestMapping("/exception")
    public Response testException()
    {
        throw new BaseException("error ,a hoooo ");
    }
}
